import util from '../util';
import record from './history';

class translateItem {
  //词条路径
  // private path: string;
  //词条Key
  private itemKey: string;
  //词条原文
  private rawText: string;
  //词条译文
  private translateText: string;
  //词条是否完成翻译
  private isComplete: boolean;
  //词条最后修改
  private lastEdit: record;
  constructor(
    // path: string,
    itemKey: string,
    rawText: string,
    translateText: string,
    isComplete: boolean,
    lastEdit: record
  ) {
    // this.path = path;
    this.itemKey = itemKey;
    this.rawText = rawText;
    this.translateText = translateText;
    this.isComplete = isComplete;
    this.lastEdit = lastEdit;
  }

  // public getPath(): string {
  //   return this.path;
  // }

  public getItemKey(): string {
    return this.itemKey;
  }

  public getRawText(): string {
    return this.rawText;
  }

  public getTranslate(): string {
    return this.translateText;
  }

  public getIsComplete(): boolean {
    return this.isComplete;
  }
  public setTranslateText(value: string) {
    this.translateText = value;
  }
  public upEditDate(value: record) {
    this.lastEdit = value;
  }
  public updateTranslateText(value: string) {
    this.lastEdit.getHistoryList();
  }
  public getLastEdit(): record {
    return this.lastEdit;
  }
}

export default translateItem;
